<%@ page session="false"%>
<%@ page contentType="text/html;charset=UTF8"%>
<%@page import="java.util.List"%>
<%@page import="net.sureon.biz.CompanyBO"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@page import="net.sureon.common.SureonConstants"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>消费记录</title>
<style type="text/css">
.style5 {
	width: 100%;
}
</style>

<style type="text/css">
.style1 {
	width: 100%;
}

.style2 {
	font-size: xx-small;
	font-family: Arial;
}

.style3 {
	font-size: xx-small;
	font-family: Arial;
}

.style4 {
	font-size: small;
}
</style>
<style type="text/css">
.ctl00_Navigation11_Menu1_0 {
	background-color: white;
	visibility: hidden;
	display: none;
	position: absolute;
	left: 0px;
	top: 0px;
}

.ctl00_Navigation11_Menu1_1 {
	color: #284E98;
	font-family: Verdana;
	font-size: Small;
	text-decoration: none;
}

.ctl00_Navigation11_Menu1_2 {
	color: #284E98;
	background-color: #B5C7DE;
	font-family: Verdana;
	font-size: Small;
}

.ctl00_Navigation11_Menu1_3 {
	
}

.ctl00_Navigation11_Menu1_4 {
	padding: 2px 5px 2px 5px;
}

.ctl00_Navigation11_Menu1_5 {
	
}

.ctl00_Navigation11_Menu1_6 {
	padding: 2px 5px 2px 5px;
}

.ctl00_Navigation11_Menu1_7 {
	background-color: #B5C7DE;
}

.ctl00_Navigation11_Menu1_8 {
	color: #FF9900;
	font-weight: normal;
}

.ctl00_Navigation11_Menu1_9 {
	background-color: #507CD1;
}

.ctl00_Navigation11_Menu1_10 {
	
}

.ctl00_Navigation11_Menu1_11 {
	background-color: #507CD1;
}

.ctl00_Navigation11_Menu1_12 {
	color: White;
}

.ctl00_Navigation11_Menu1_13 {
	color: White;
	background-color: #284E98;
}

.ctl00_Navigation11_Menu1_14 {
	color: White;
}

.ctl00_Navigation11_Menu1_15 {
	color: White;
	background-color: #284E98;
}

.style1 {
	width: 100%;
}
</style>

</head>
<body>
<jsp:include page="systemHeader.jsp" />
<table cellpadding="0" cellspacing="0" class="style5">
	<tr>
		<td colspan="2">
		<table cellpadding="0" cellspacing="0" class="style5">
			<tr>
				<td style="text-align: left" bgcolor="#FFFBD6" class="style6">
				<table id="ctl00_ContentPlaceHolder1_Menu1"
					class="ctl00_ContentPlaceHolder1_Menu1_2" cellpadding="0"
					cellspacing="0" border="0">
					<tr>
						<td onmouseover="Menu_HoverStatic(this)"
							onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"
							id="ctl00_ContentPlaceHolder1_Menu1n0">
						<table
							cellpadding="0" cellspacing="0" border="0" width="100%">
							<tr>
								<td style="white-space: nowrap;"><a
									class="ctl00_ContentPlaceHolder1_Menu1_1 ctl00_ContentPlaceHolder1_Menu1_3 ctl00_ContentPlaceHolder1_Menu1_8"
									href="<%=request.getContextPath() %>/sysAdmin/costChange.do">费用充值</a></td>
							</tr>
						</table>
						</td>
						<td style="width: 3px;"></td>
						<td onmouseover="Menu_HoverStatic(this)"
							onmouseout="Menu_Unhover(this)" onkeyup="Menu_Key(this)"
							id="ctl00_ContentPlaceHolder1_Menu1n1">
						<table cellpadding="0"
							cellspacing="0" border="0" width="100%"
							class="ctl00_ContentPlaceHolder1_Menu1_4 ctl00_ContentPlaceHolder1_Menu1_9">
							<tr>
								<td style="white-space: nowrap;"><a
									class="ctl00_ContentPlaceHolder1_Menu1_1 ctl00_ContentPlaceHolder1_Menu1_3"
									href="<%=request.getContextPath() %>/sysAdmin/sysConsumeRecord.do">消费记录</a></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
</td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" style="color: #333333; width: 100%; border-collapse: collapse; font-size: small; font-family: Arial">
				<tr>
						<td>
							<%
								List<CompanyBO> list = (List<CompanyBO>)request.getAttribute("siteURLDropDownDisplayList");
							 %>
							<form action="<%=request.getContextPath() %>/sysAdmin/sysConsumeRecord.do" method="post">
								选择月份:<input type="text" size="7" name="startMonth" value="${requestScope.strStartMonth }" />&nbsp;&nbsp;
										<input type="text" size="7" name="endMonth" value="${requestScope.strEndMonth }" />&nbsp;&nbsp;
								公司简称:	
								 
										<select name="companyID" value="">
												<option value="-1">---请选择</option>
											<%
												for(int i = 0; i < list.size();i ++) {
													CompanyBO company = (CompanyBO)list.get(i);
													long companyID = -1;
													try {
														companyID = (Long)request.getAttribute("companyID");
													} catch(Exception e) {
													}
											 %>
												<option value="<%=company.getCompanyID() %>" <%=companyID == company.getCompanyID() ? "selected" : "" %>><%=company.getCompanyVO().getSiteURL() %></option>
											<%
												}
											 %>												
										
										<input type="hidden" name="inputed" value="true" />
										<input type="submit" value="过滤" />
							</form>
							
						</td>
						<td />
					</tr>
				</table>
				<div>


				<table cellspacing="0" cellpadding="4" border="0"
					id="ctl00_ContentPlaceHolder1_GridView1"
					style="color: #333333; width: 100%; border-collapse: collapse; font-size: small; font-family: Arial">
					<tr
						style="color: White; background-color: #507CD1; font-weight: bold;">
						<th scope="col">公司全称</th>
						<th scope="col">公司简写</th>						
						<th scope="col">月份</th>
						<th scope="col">用户总数</th>
						<th scope="col">冻结用户数</th>
						<th scope="col">新增用户数</th>
						<th scope="col">收费用户数</th>
						<th scope="col">费率</th>
						<th scope="col">消费金额</th>
						<th scope="col">折扣</th>
					</tr>
				<c:forEach var="record" items="${records}" varStatus="rowCounter">
					<c:choose>
						<c:when test="${rowCounter.count % 2 == 0}">
							<c:set var="bgColor" scope="page" value="#EFF3FB;" />
						</c:when>
						<c:otherwise>
							<c:set var="bgColor" scope="page" value="#FFFFFF;" />
						</c:otherwise>
					</c:choose>
						<tr style="background-color: ${bgColor}"  align="center">
						<td>${record.companyFullName }</td>
						<td>${record.siteURL }</td>
						<td><fmt:formatDate value="${record.consumeMonth}" type="date" pattern="yyyy-MM"/></td>						
						<td>${record.totalUserNumber}</td>
						<td>${record.frozeUserNumber}</td>
						<td>${record.newUserNumber}</td>
						<td>${record.billUserNumber}</td>
						<td>${record.price}</td>
						<td>${record.totalAmount}</td>
						<td>${record.discount}</td>
					</tr>
			</c:forEach>
			</table>

				</div>

				<jsp:include page="../footer.jsp"></jsp:include>
</body>
</html>
